<?php	
	require_once('../../execute/inc/config.inc');
	$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
	if(!$link) {
		die('Failed to connect to server: ' . mysql_error());
	}
	
	//Select database
	$db = mysql_select_db(DB_DATABASE);
	if(!$db) {
		die("Unable to select database");
	}
	$qry = mysql_query("DELETE FROM course_student WHERE cs_id='".$_GET['id']."'");
	if($qry){
		echo "Course Participation Cancelled Successfully";
	}
	else{
		echo mysql_error();
	}
	?>